package com.lxdp.controller;


import com.lxdp.dto.Result;
import com.lxdp.service.IFollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hong
 * @since 2023-04-22
 */
@RestController
@RequestMapping("/follow")
public class FollowController {
    @Autowired
    private IFollowService followService;

    @PutMapping("/{id}/{isFollow}")
    public Result follow(@PathVariable Long id ,@PathVariable Boolean isFollow){
        return followService.follow(id,isFollow);

    }

    @GetMapping("/or/not/{id}")
    public Result isFollow(@PathVariable Long id){
        return followService.isFollow(id);
    }

    @GetMapping("/common/{id}")
    public Result commonFollow(@PathVariable Long id){
        return followService.commonFollow(id);
    }
}
